/**
 * 
 */
package com.youxin.busfoundation.enums;

/**
 * @description 系统消费充值服务类型
 * @author yingde.cao
 * @date 2017年12月12日
 * @version 1.0
 */
public enum ServiceType {
	All(0,"所有"),
	Pay(1,"充值"),
	RenewMember(2,"续约"),
	Telphone(3,"电话消费"),
	Message(4,"短信"),
	ViewContact(5,"查询联系人")
	;
	
	public int getValue() {
		return value;
	}
	
	private int value;
	private String name;
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setValue(int value) {
		this.value = value;
	}

	private ServiceType(int value,String name) {
		this.value = value;
		this.name=name;
	}
	
	public static ServiceType valueOf(int val)
	{			
		for(ServiceType m : ServiceType.values()) 
		{
			if(val==m.getValue())
				return m;
	    }
		return null;
	}
}
